/**
 * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package com.crossriver.crgis.database.service.http;

import com.crossriver.crgis.database.model.Contact_Information;

import com.liferay.portal.kernel.json.JSONArray;
import com.liferay.portal.kernel.json.JSONFactoryUtil;
import com.liferay.portal.kernel.json.JSONObject;

import java.util.List;

/**
 * @author    Wole Adetiba
 * @generated
 */
public class Contact_InformationJSONSerializer {
	public static JSONObject toJSONObject(Contact_Information model) {
		JSONObject jsonObj = JSONFactoryUtil.createJSONObject();

		jsonObj.put("applicationId", model.getApplicationId());
		jsonObj.put("userId", model.getUserId());
		jsonObj.put("houseNo", model.getHouseNo());
		jsonObj.put("addressLine1", model.getAddressLine1());
		jsonObj.put("addressLine2", model.getAddressLine2());
		jsonObj.put("city", model.getCity());
		jsonObj.put("state", model.getState());
		jsonObj.put("country", model.getCountry());
		jsonObj.put("phoneHome", model.getPhoneHome());
		jsonObj.put("phoneOffice", model.getPhoneOffice());
		jsonObj.put("phoneMobile", model.getPhoneMobile());
		jsonObj.put("fax", model.getFax());
		jsonObj.put("poBox", model.getPoBox());
		jsonObj.put("lga", model.getLga());
		jsonObj.put("emailAddress", model.getEmailAddress());
		jsonObj.put("otherInformation", model.getOtherInformation());

		return jsonObj;
	}

	public static JSONArray toJSONArray(
		com.crossriver.crgis.database.model.Contact_Information[] models) {
		JSONArray jsonArray = JSONFactoryUtil.createJSONArray();

		for (Contact_Information model : models) {
			jsonArray.put(toJSONObject(model));
		}

		return jsonArray;
	}

	public static JSONArray toJSONArray(
		com.crossriver.crgis.database.model.Contact_Information[][] models) {
		JSONArray jsonArray = JSONFactoryUtil.createJSONArray();

		for (Contact_Information[] model : models) {
			jsonArray.put(toJSONArray(model));
		}

		return jsonArray;
	}

	public static JSONArray toJSONArray(
		List<com.crossriver.crgis.database.model.Contact_Information> models) {
		JSONArray jsonArray = JSONFactoryUtil.createJSONArray();

		for (Contact_Information model : models) {
			jsonArray.put(toJSONObject(model));
		}

		return jsonArray;
	}
}